<%@page import="com.alibaba.fastjson.JSONObject"%>
<%@page import="com.dingpeikeji.quickdeer.modules.base.web.FSysController"%>
<%@page import="com.dingpeikeji.quickdeer.core.common.utils.CookieUtils"%>
<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ include file="/WEB-INF/views/include/constrant.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>【霞客约车】国内首选的旅行包车服务平台</title>
<meta name="keywords" content="霞客约车网，霞客，约车,互联网巴士，巴士,xiake,xiakeyueche, bus，包车，用车，租车，大巴，直通车，车票，自助游，跟团游,接送机">
<meta name="description" content="霞客约车网是一款互联网+交通出行平台，联合专业客运企业提供各类包车、旅行车票及个性化的定制包车产品，产品包括日租包车、旅游包车、接送机/火车、自助游车票、跟团游巴士、机场直通车、定制包车等，致力于为用户提供更安全、更便捷、更集约的旅行用车服务。">
<link href="${ctxStatic }/index/css/home.css" rel="stylesheet">
<link href="${ctxStatic }/cityselector/cityselect.css" rel='stylesheet'type='text/css' />
<link href="${ctxStatic }/index/css/xkbtbox.css" rel='stylesheet'type='text/css' />
<script src="${ctxStatic }/jquery/jquery-1.8.3.min.js"></script>
<script src="${ctxStatic }/index/js/home.js"></script>
<jsp:include page="/WEB-INF/views/layouts/head.jsp"></jsp:include>
    <script>
        $(document).ready(function(){

         // 初始化站点选择框
       	$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,b'}, function(data) {
       		var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
       		new Vcity.CitySelector({input:'departcity_sitename1',cityData:allCity});
       		new Vcity.CitySelector({input:'departcity_sitename2',cityData:allCity});
       	});
       	$.post('${ctxFront}/info/site/siteJson',{spottypes:'0,0'}, function(data) {
       		var allCity = data;//['北京市#001#1|beijing|bj','上海市#002#0|shanghai|sh'];
       		new Vcity.CitySelector({input:'destcity_sitename3',cityData:data});
       	});
    	 // 机场
		$.post('${ctxFront}/info/site/siteJson',{spottypes:'9'}, function(data) {
			new Vcity.CitySelector({input:'departcity_sitename4',cityData:data});
		});
        $("#search1").click(function(){
        	if($("#departcity_sitename1").val()==''){
        		alert("请选择出发地");
        		return false;
        	}else{
     	   $("#travelRentForm").submit();
        	}
        })
      //市内包车提交
    	$('#daysearch').click(function(){
    		var val=$('#dayRentTypes').val();
    		var destcity=$('#departcity_sitename2').val();
    		var day = $('#day').val();
    		if(destcity=='') {
    			alert("你还未选择出发地");
    			return false;
    		} else if(day=='') {
    			alert("你还未选择包车天数");
    			return false;
    		} else {
    			$('#dayRentForm').submit();
    		}
    	});
     // 日租包车包车类型处理
    	$('.dayRentTab').click(function(){
    		$('#dayRentTypes').val($(this).attr('data-value'));
    		changeRentType($(this).attr('data-value'));
    	});
    	$('#dayRentTypes').change(function(){
    		changeRentType($(this).val());
    	});
    	$('.airportRentTab').click(function(){
			$('#airportRentType').val($(this).attr('data-value'));
			changeShowSpan($(this).attr('data-value'));
		});
       });
    	function changeShowSpan(val){
    		if(val=='接机') {
    			var span = $('.airportDestcitySpan');
    			$(span[0]).text('抵达地点:');
    		} 
    		if(val=='送机') {
    			var span = $('.airportDestcitySpan');
    			$(span[0]).text('出发地点:');
    		}
    }
        function changeRentType(val){
        	if(val=='市内') {
        		$('#day').val("");
        	}
        	if(val=='跨市') {
        		$('#day').val("");
        	}
        }
    </script>
</head>
<body><input type="hidden" id="menuInfo" value="index">
<div class="table_slide">
    <div class="container">

        <ul class="tabs" style="float: left">
            <li class="sjx_kk">
                <a href="#tab1">旅游包车</a>
                <i class="sjx_tri"></i>
            </li>
            <li class="sjx_kk">
                <a href="#tab2">按天包车</a>
                <i class="sjx_tri sto"></i>
            </li>
            <li class="sjx_kk">
                <a href="#tab3">接送机</a>
                <i class="sjx_tri sto"></i>
            </li>

        </ul>

        <div class="table_container">
<form  id="travelRentForm" action="${ctxFront}/rentproduct/travelList" method="post">
        <input type="hidden" name="rentType" value="${ORDER_TYPE_RENTPRODUCT_TRAVEL }"/>
        <input id="pageNo" name="pageNo" type="hidden" value="1"/>
		<input id="pageSize" name="pageSize" type="hidden" value="15"/>
		 <input id="dayRentType" type="hidden" name="tabType" value="" />
            <div id="tab1" class="tab_content" style="float: right">

                <div id="tab4" class="tabs_content">
                    <div class="place">
                        <dl>
                            <dd class="place_1">
                                <span class="place_2">出发城市&nbsp;&nbsp;</span>
<input type="text" id="departcity_sitename1" data-autocity="yes" class="d_x_so place_3" name="departcity.sitename" value="" placeholder="请输入出发地" autocomplete="off"/>
<input type="hidden" name="departcity.siteid" value="">
                            </dd>
                            <dd class="side">
                                <span>包车类型&nbsp;&nbsp;</span>
         <input type="radio" name="tabType" value="周边游包车" checked="checked">
         <span>周边游包车</span>
         <input type="radio" name="tabType" value="目的地包车">
         <span>目的地包车</span>
                            </dd>
                        </dl>
                        <input class="sou" type="button" id="search1" value="搜索">
                    </div>
                </div>
            </div>
</form>
 <form id="dayRentForm" action="${ctxFront}/rentproduct/list" method="post">
  	    <input id="dayRentTypes" type="hidden" name="tabType" value="跨市"/>
		<input type="hidden" name="rentType" value="${ORDER_TYPE_RENTPRODUCT_DAY }"/>	
            <div id="tab2" class="tab_content" style="float: right">
                <div class="borders_1" style="display: none">
                    <div class="b_tri_box2">
                        <i class="d_tri" style="margin-right: -20px;"></i>
                    </div>
                </div>
                <div id="tab6" class="tabs_content_1">
                    <div class="antian">
                        <dl>
                            <dd class="chufa">
                                <span>出发城市&nbsp;&nbsp;</span>
      <input type="text" id="departcity_sitename2" data-autocity="yes" class="shanghai" 
      name="departcity.sitename" value="" placeholder="请输入出发城市" autocomplete="off">
	<input type="hidden" name="departcity.siteid" value="" id="departcity.siteid">
                            </dd>
                            <dd class="list">
                                <span>出发时间&nbsp;&nbsp;</span>
<input type="text" name="fromdateStr" readonly class="riqi Wdate"  value="${tomorrow }" style="height: 34px;width: 125px"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,maxDate:'${maxDay }',minDate:'${today}'});"/>
<input type="text" name="time"  class="shijian Wdate" value="${time }" style="height: 34px"
onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});"/>                          
                            </dd>
                            <dd class="baoche">

                                <span>包车范围&nbsp;&nbsp;</span>
<input class="kuashi dayRentTab" type="radio" name="bm1" value=""  data-value="跨市" checked="checked">
<span>跨市包车</span>
<input class="shinei dayRentTab" type="radio" name="bm1" value="" data-value="市内" >
<span>市内包车</span>
                            </dd>
                            <dd class="list">
                                <span>包车天数&nbsp;&nbsp;</span>

                                <select class="sele" id="day" name="daysnum">                
                                    <option class="shhi" value='0'>0.5天</option>
                                    <option value='1' selected="selected">1天</option>
                                    <option value='2'>2天</option>
                                    <option value='3'>3天</option>
                                    <option value='4'>4天</option>
                                    <option value='5'>5天</option>
                                    <option  value='6'>6天</option>
                                    <option  value='7'>7天</option>
                                    <option  value='8'>8天</option>
                                     <option  value='9'>9天</option>
                                     <option  value='10'>10天</option>
                                </select>
                            </dd>
                            <script>
                            	$(function(){
                            		            $(".kuashi").click(function(){
                $(".shhi").hide();
                $('.sele option').eq(1).attr('selected',true)
            });
            $(".shinei").click(function(){
                $(".shhi").show();
                $('.sele option').eq(0).attr('selected',true)
                 $('.sele option').eq(1).removeAttr('selected')
            });
                            	})
                            </script>
                        </dl>
                    </div>
                    <input class="sou_1" type="button" value="搜索" id="daysearch">

                </div>
            </div>
</form>
<form id="airportRentForm" action="${ctxFront}/rentproduct/airlist" method="post">
<input type="hidden" name="rentType" value="${ORDER_TYPE_RENTPRODUCT_AIRPLANE }"/>
<input type="hidden" name="mapkm" value="" id="mapkm"/>
<input type="hidden" name="maptime" value="" id="maptime"/>
<input type="hidden" name="mes" value="" id="mes"/>
<input id="airportRentType" type="hidden" name="tabType" value="接机"/>
            <div id="tab3" class="tab_content" style="float: right">
                <ul class="tabs_2">
                    <li class="jj3 " >
                        <a href="#tab8" class="greenx apt_t_g airportRentTab" data-value="接机">接机</a>
                    </li>
                    <li class="jj3 " >
                        <a href="#tab8" class="airportRentTab apt_s_j" data-value="送机">送机</a>
                    </li>
                </ul>
                <div class="borders_2">
                    <div class="b_tri_box3">
                        <i class="d_tri" style="margin-right: -15px;"></i>
                    </div>
                    <div class="b_tri_box3">
                        <i class="d_tri"></i>
                    </div>
                </div>
                <div id="tab8" class="tabs_content_2">
                    <div class="meet">
                        <dl>
                            <dd class="meet_1">
                                <span class=" oi_port" >机场&nbsp;&nbsp;</span>
           <input type="text" id="departcity_sitename4" class="display_ib flex_select1 date_3" name="departcity.sitename" 
		value="" placeholder="请选择机场" autocomplete="off">
		<input type="hidden" name="departcity.siteid" value="">
                            </dd>
          <dd class="car-time">
              <span>用车时间&nbsp;&nbsp;</span>
<input type="text" name="fromdateStr" readonly class="display_ib flex_input_ty1 Wdate" value="${tomorrow }" style="height: 34px;width: 125px"
onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false,maxDate:'${maxDay }',minDate:'${today}'});" />
<input type="text" name="time" readonly class="display_ib flex_input_th1 Wdate car-time-1 " value="${time }" style="height: 34px;width: 90px"
onclick="WdatePicker({dateFmt:'HH:mm',isShowClear:false});" />
          </dd>
                            <dd class="dida">
                                <span class=" ar_date airportDestcitySpan">送达地点&nbsp;&nbsp;</span>
     <input type="text" id="destcity_sitename3" data-autocity="yes" name="destcity.sitename" style="height: 34px;width: 75px"
         value="" class="apt-city" placeholder="请选择" autocomplete="off">
		<input type="hidden" name="destcity.siteid"  id="destcity.siteid" value="">
		<input type="text" placeholder="请输入具体地址" id="suggestId" value="" style="height: 34px;width: 140px"
		 name="aboardAddress" class="addss apt-date" />
<div id="searchResultPanel" style="display:none;"></div>
                            </dd>
                        </dl>
                        <input class="sou_2" type="button" id="airportsearch" value="搜索">
                    </div>
                </div>
            </div>
            </form>
        </div>
    </div>

    <div class="slid">

        <div class="slider" style="z-index: 0">
            <ul class="slider-main">
                <li class="slider-panel">
                    <a href="#" target="_blank"><img alt="" src="${ctxStatic }/index/images/banner/3.jpg"></a>
                </li>
                <li class="slider-panel">
                    <a href="#" target="_blank"><img alt="" src="${ctxStatic }/index/images/banner/1.jpg"></a>
                </li>
                <li class="slider-panel">
                    <a href="#" target="_blank"><img alt="" src="${ctxStatic }/index/images/banner/2.jpg"></a>
                </li>
            </ul>
            <div class="slider-extra">
                <ul class="slider-nav">
                    <li class="slider-item"></li>
                    <li class="slider-item"></li>
                    <li class="slider-item"></li>
                </ul>
                <div class="slider-page">
                    <a class="slider-pre">&lt;</a>
                    <a class="slider-next">&gt;</a>
                </div>
            </div>
        </div>
    </div>
</div>

    <div class="provide">
        <h3>我们为您提供</h3>
        <h5>5种用车场景，让用车更加个性化</h5>
        <div class="tourism">
            <img class="tourism-1" src="${ctxStatic }/index/images/home-1.png">
            <h4 class="tourism-2">旅游包车</h4>
            <h4 class="tourism-3">千条特色路线一口价</h4>
        </div>
        <div class="per">
            <img class="per-1" src="${ctxStatic }/index/images/home-2.png">
            <h4 class="per-2">按天包车</h4>
            <h4 class="per-3">任意天数自由搭配</h4>
        </div>
        <div class="transfer">
            <img class="transfer-1" src="${ctxStatic }/index/images/home-3.png">
            <h4 class="transfer-2">接送机</h4>
            <h4 class="transfer-3">免费等候90分钟</h4>
        </div>

        <div class="cust">
            <img class="cust-1" src="${ctxStatic }/index/images/home-5.png">
            <h4 class="cust-2">定制包车</h4>
            <h4 class="cust-3">量身打造一口价</h4>
        </div>
        <div class="train">
            <img class="train-1" src="${ctxStatic }/index/images/home-4.png">
            <h4 class="train-2">行程顾问</h4>
            <h4 class="train-3">提供旅行路线定制服务</h4>
        </div>

    </div>

    <div id="item5" class="sr_w sr_space ">
        <div class="sr_center">
            <h2 class="sr_color_3">多款车型供应</h2>
            <p class="sr_color_9">方便公司团建、聚会出游多款车型任您选择</p>
        </div>
        <div class="sr_accordion sr_mb_20">
            <ul>
                <li class="active" >
                    <img src="${ctxStatic }/index/images/car_1.png" alt="中港过境车 7座">
                    <span class="info">经济型</span>
                    <div class="mask"></div>
                </li>
                <li >
                    <img src="${ctxStatic }/index/images/car_2.png" alt="商务7座">
                    <span class="info">舒适型</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_3.png" alt="商务9座">
                    <span class="info">豪华型</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_4.png" alt="纯电动15座">
                    <span class="info">商务型</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_5.png" alt="中巴22座">
                    <span class="info">别克GL8</span>
                    <div class="mask"></div>
                </li>
            </ul>
        </div>
        <div class="sr_accordion">
            <ul>
                <li>
                    <img src="${ctxStatic }/index/images/car_6.png" alt="大巴35座">
                    <span class="info">19座纯电动中巴</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_7.png" alt="大巴37座">
                    <span class="info">20座中巴</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_8.png" alt="大巴47座">
                    <span class="info">35座大巴</span>
                    <div class="mask"></div>
                </li>
                <li>
                    <img src="${ctxStatic }/index/images/car_9.png" alt="大巴49座">
                    <span class="info">45座大巴</span>
                    <div class="mask"></div>
                </li>
                <li class="active" >
                    <img src="${ctxStatic }/index/images/car_10.png" alt="大巴53座">
                    <span class="info">53座大巴</span>
                    <div class="mask"></div>
                </li>
            </ul>
        </div>
    </div>
 <div class="cooper">
 <div class="hezuo">

    <p><img src="${ctxStatic }/index/images/line.jpg" style="padding-right: 40px">
    <a href="${pageContext.request.contextPath }/webInfo.jsp?id=jm" style="font-size: 25px;">合&nbsp;作&nbsp;共&nbsp;赢</a><img style="padding-left: 40px"  src="${ctxStatic }/index/images/line.jpg"></p>
    <p><a href="${pageContext.request.contextPath }/webInfo.jsp?id=jm">诚邀全国各地车队加盟霞客约车平台，共享互联网出行成果</a></p>
</div>
</div>
    <div class="guarantee">
        <h3>六大保障</h3>
        <h5>让用车全程无忧</h5>
        <div  id="guar" class="guarantee-1">
            <img src="${ctxStatic }/index/images/home-6.png">
            <div class="guar">
            <p class="guar-1">资金保障</p>
            <p class="guar-2">平台代理资金</p>
            <p class="guar-2">用车满意后再结算</p>
            </div>
        </div>

        <div class="guarantee-1">
            <img src="${ctxStatic }/index/images/home-7.png">
            <div class="guar">
                <p class="guar-1">在线比价</p>
                <p class="guar-2">多家客运公司入驻</p>
                <p class="guar-2">价格透明任意选</p>
            </div>
        </div>
        <div class="guarantee-1">
            <img src="${ctxStatic }/index/images/home-8.png">
            <div class="guar">
                <p class="guar-1">准时到达</p>
                <p class="guar-2">司机准时抵达</p>
                <p class="guar-2">不延误</p>
            </div>
        </div><br>

    <div  id="magor" class="guarantee-1">
        <img src="${ctxStatic }/index/images/home-9.png">
        <div class="guar">
            <p class="guar-1">专业司机</p>
            <p class="guar-2">6年以上驾龄</p>
            <p class="guar-2">经验丰富适应各种行车环境</p>
        </div>
    </div>

    <div class="guarantee-1">
        <img src="${ctxStatic }/index/images/home-10.png">
        <div class="guar">
            <p class="guar-1">舒适新车</p>
            <p class="guar-2">三年内资质齐全车辆</p>
            <p class="guar-2">舒适安心</p>
        </div>
    </div>
    <div class="guarantee-1">
        <img src="${ctxStatic }/index/images/home-11.png">
        <div class="guar">
            <p class="guar-1">百万乘车险</p>
            <p class="guar-2">均为百万险护航</p>
            <p class="guar-2">不止一万也不怕万一</p>
        </div>
    </div>
    </div>
  <div id="eject">
		<div class="eject-wrap">
			<div class="eject-box">
				 <span class="eject-ico">×</span>
				<div class="eject-img">
					<img src="${ctxStatic }/index/images/bannercopy.png" />
				</div>
				<div class="eject-qr">
					 <div class="qr-app">
					 	<div class="qr-app-img"></div>
					 	<p>下载App移动端</p>:
					 </div>
                     <div class="qr-weixi">
					 	<div class="qr-weixin-img"></div>
					 	<p>关注微信公众号</p>
					 </div>
				</div>
			</div>
		</div>
		<div class="eject-btn"></div>
	</div>
<jsp:include page="/WEB-INF/views/layouts/foot.jsp"></jsp:include>
<script type="text/javascript" src="${ctxStatic }/index/js/map.js"></script>
<script>
    	$(function(){
    		$('.eject-ico').click(function(){
    			$('.eject-wrap').fadeOut();
    			$(this).css('transform','rotate(360deg)');
    	        $('.eject-btn').animate({left:'0px'},800);
    	        $('#eject').animate({width:'200px'})
    		});
    		$('.eject-btn').click(function(){
    			setInterval(setTime);
    			$('.eject-wrap').fadeIn();
    			$('.eject-btn').animate({left:'-168px'},500);
    			 $('#eject').animate({width:'100%'})
    		});
    		function autoplay(){
    			setTime=setTimeout(function(){
    			$('.eject-wrap').fadeOut();
    			$('.eject-btn').animate({left:'0px'},800);
    		},12000)
    		};
    		autoplay();
    	})
    </script>
<script type="text/javascript">
//接送机提交
var km = 0;
var time = 0;
$(function(){
	$('.eject-ico').click(function(){
		$('.eject-wrap').animate({left:'-100%'},500);
		$(this).css('transform','rotate(360deg)');
        $('.eject-btn').animate({left:'0px'},800);
	});
	$('.eject-btn').click(function(){
		setInterval(setTime);
		$('.eject-wrap').animate({left:'0'},800);
		$('.eject-btn').animate({left:'-168px'},500);
	});
	function autoplay(){
		setTime=setTimeout(function(){
		$('.eject-wrap').animate({left:'-100%'},800);
		$('.eject-btn').animate({left:'0px'},800);
	},20000)
	};
	autoplay();
	$("#airportsearch").click(function(){
		if($('#departcity_sitename4').val()=="") {
			alert("机场不能为空");
			return false;
		}
		if($('#destcity_sitename3').val()=="") {
			alert("城市不能为空");
			return false;
		}
		if($('#suggestId').val()=="") {
			alert("请输入详细地址");
			return false;
		}
		var x= $('#suggestId').val();
		var y = $('#departcity_sitename4').val()
		var map = new BMap.Map("allmap");
var output = "从"+y+"到"+x+"驾车预计需要";
var searchComplete = function (results){
	if (transit.getStatus() != BMAP_STATUS_SUCCESS){
		return ;
	}
	var plan = results.getPlan(0);
	output += plan.getDuration(true) + "\n";                //获取时间
	time = plan.getDuration(true);
	$('#maptime').val(time)
	output += "总路程大约为：" ;
	output += plan.getDistance(true) + "\n";             //获取距离
	km = plan.getDistance(true);
	$('#mapkm').val(km);
}
var transit = new BMap.DrivingRoute(map, {renderOptions: {map: map},
	onSearchComplete: searchComplete,
	onPolylinesSet: function(){        
		//$("#distance").html(output);
		$("#mes").val(output);
}});
transit.search(x, y);
window.setTimeout(submitform, 1200); 
function submitform() 
{ 
$('#airportRentForm').submit();
} 
})
	})
</script>
</body>
</html>